import React, { Component } from 'react';
import '../components/index/Header'
import { Route, Switch, Redirect } from 'react-router-dom'
import Indexx from './Second/Indexx'
import Cartt from './Second/Cartt'
import Mine from './Second/Mine'
import Shopcar from '../views/Second/Shopcar'
import Tabber from '../components/index/Tabber';
import NotFound from '../views/NotFound';
import { PullToRefresh } from 'antd-mobile'
class index extends Component {
    render() {
        return (
            <div className="div">
                <PullToRefresh>
                    <div className='index'>
                        <Switch>
                            <Route exact path={'/index/indexx'} component={Indexx} />
                            <Route exact path={'/index/cartt'} component={Cartt} />
                            <Route exact path={'/index/shopcar'} component={Shopcar} />
                            <Route exact path={'/index/mine'} component={Mine} />
                            <Redirect exact from='/index' to={'/index/indexx'} />
                            <Route path={'*'} component={NotFound} />
                        </Switch>
                        <Tabber />

                    </div>
                </PullToRefresh>
            </div>
        );
    }
}

export default index;